package com.taihe.config;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;

/**
 * Created by zwt on 2018/7/23.
 * 自定义的properties
 */
@Configuration
@ConfigurationProperties(prefix = "my", ignoreUnknownFields = false)
@PropertySource("classpath:config/my.properties")
@Component
public class MyProperties {

    private String imageUrl;

    private String name;



    public String getImageUrl() {
        return imageUrl;
    }

    public void setImageUrl(String imageUrl) {
        this.imageUrl = imageUrl;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}
